package com.prs.crm.dao.cdxh.impl;

import java.io.Serializable;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;

import org.courser.hibernate.QueryExample;
import org.courser.ui.PaginationSupport;
import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.springframework.orm.hibernate3.HibernateCallback;

import com.prs.crm.dao.cdxh.CdlogisticsDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.cdxh.Cdlogistics;
import com.prs.crm.domain.cdxh.cd_Product;



public class CdlogisticsDaoImpl extends BaseDaoImpl<Cdlogistics> implements CdlogisticsDao {

@Override
	@SuppressWarnings("unchecked")
	public List<cd_Product> getAllproduct() {
		// TODO Auto-generated method stub
		return (List<cd_Product>) this.getHibernateTemplate().execute(new HibernateCallback() {


			@Override
			public Object doInHibernate(Session arg0)
					throws HibernateException, SQLException {
				// TODO Auto-generated method stub
				Criteria criteria = arg0.createCriteria(cd_Product.class);
				return criteria.list();
				
			}

		
			
		});
	}





	
	

	
	
}
